@echo off

hlex bin/caxe.hlx -cpp bin/lexer.exe cx-src/HLex.cx
if errorlevel 1 goto fail

hllr bin/caxe.hlr cx-src/HLlr.cx -lalr1 -hlexcpp
if errorlevel 1 goto fail

caxe src cx-src
if errorlevel 1 goto fail

haxe -cp src -main Main -neko bin/caxe.n -D windows
if errorlevel 1 goto fail

nekotools boot bin/caxe.n

goto exit
:fail
pause
:exit